using System;
using System.Collections.Generic;
using System.Text;
using usm.SolDev.DataBase.DataObjects.Experiment;

namespace usm.SolDev.DataBase.DataObjects
{
    /// <summary>
    ///     TO DO: get specs from project manager.
    /// </summary>
    public enum ChartType
    {
        ctDiagram
    }

    /// <summary>
    ///     Describes the chart properties relevant data
    /// </summary>
    public class ChartDataObject : DataObject
    {
        #region Chart type descriptions
        /// <summary>
        ///     The literal chart type descriptions. The number of
        /// strings must match the number of ChartType enumeration items.
        /// </summary>
        public static string [] ChartTypeDescription = 
        {
            "Diagram"
        };
        #endregion

        #region private fields
        private ProjectDescriptor projectDescriptor;
        private Entity activeEntity;
        private ChartType chartType;
        private Parser parsedResults;
        private int experiment;
        #endregion

        #region Constructors 
        /// <summary>
        ///     Default constructor
        /// </summary>
        public ChartDataObject () {}

        /// <summary>
        ///     Initialization constructor
        /// </summary>
        /// <param name="projectDescriptor">the project descriptor to which this chart will refer</param>
        public ChartDataObject(ProjectDescriptor projectDescriptor) : this ()
        { 
            this.projectDescriptor = projectDescriptor;
        }
        #endregion

        #region Public properties
        /// <summary>
        ///     The project to which it refers to
        /// </summary>
        public ProjectDescriptor Project
        {
            get { return projectDescriptor; }
            set { projectDescriptor = value; }
        }

        /// <summary>
        ///     If there is no active entity, the property is null. When not
        /// null it holds the selected entity in the chart options
        /// </summary>
        public Entity ActiveEntity
        {
            get { return activeEntity; }
            set { activeEntity = value; }
        }

        /// <summary>
        ///     Hold's the selected chart type
        /// </summary>
        public ChartType ChartType
        {
            get { return chartType; }
            set { chartType = value;}
        }

        /// <summary>
        ///     The engine which parses all results and holds them into type
        /// array lists.
        /// </summary>
        public Parser ParsedResults
        {
            get { return parsedResults; }
            set { parsedResults = value;}
        }

        /// <summary>
        ///     Holds the active experiment
        /// </summary>
        public int Experiment
        {
            get { return experiment; }
            set { experiment = value; }
        }
        
        #endregion
    }
}
